import AutoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

export function viteAutoImport() {
  return AutoImport({
    imports: ['vue', 'vue-router', 'pinia'],
    resolvers: [
      // 自动导入 Element Plus 相关函数
      ElementPlusResolver(),
    ],
    dts: false,
  })
}
